﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x02000049 RID: 73
	public class ByteFormatter : IMessagePackFormatter<byte>
	{
		// Token: 0x06000113 RID: 275 RVA: 0x00004AAB File Offset: 0x00002EAB
		private ByteFormatter()
		{
		}

		// Token: 0x06000114 RID: 276 RVA: 0x00004AB3 File Offset: 0x00002EB3
		public int Serialize(ref byte[] bytes, int offset, byte value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteByte(ref bytes, offset, value);
		}

		// Token: 0x06000115 RID: 277 RVA: 0x00004ABD File Offset: 0x00002EBD
		public byte Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return MessagePackBinary.ReadByte(bytes, offset, out readSize);
		}

		// Token: 0x0400003D RID: 61
		public static readonly ByteFormatter Instance = new ByteFormatter();
	}
}
